import request from "@/util/request";

// 学生的课程
export function courseDetail(currentPage, pageSize, sno) {
  return request({
    url: `/student-api/edu/student/infoS/${currentPage}/${pageSize}`,
    method: "get",
    params: {
      sno,
    },
  });
}

export function getStudentPage(currentPage, pageSize) {
  return request({
    url: `/student-api/edu/student/page/${currentPage}/${pageSize}`,
    method: "get",
  });
}

export function delStudent(sno) {
  return request({
    url: `/student-api/edu/student/delete/${sno}`,
    method: "delete",
  });
}

export function searchStudent(sno) {
  return request({
    url: `/student-api/edu/student/info/${sno}`,
    method: "get",
  });
}

export function editStudent(studentForm) {
  return request({
    url: `/student-api/edu/student/update`,
    method: "put",
    data: studentForm,
  });
}

export function addStudent(studentForm) {
  return request({
    url: `/student-api/edu/student/save`,
    method: "post",
    data: studentForm,
  });
}
